<template>
  <div class="platform-num-setting">
    <!-- 头部 -->
    <header>
      <Input v-model="value" placeholder="用户手机号即时搜索" style="width: 300px" />
    </header>
    <!-- 表格 -->
    <div class="table-box">
      <s-table :columns="TableHead" :data="TableData">
        <div slot="action" slot-scope="{ row, column , index }">
          <Button type="text" size="small" style="margin-right: 5px" @click="skitAddProject('edit')">拒绝</Button>
          <Button type="text" size="small" style="margin-right: 5px" @click="skitAddProject('edit')">处理</Button>
        </div>
      </s-table>
    </div>
    <!-- 分页器 -->
    <footer class="footer">
      <s-page @pageChagne='pageChagne'></s-Page>
    </footer>
  </div>
</template>

<script>
import STable from "@/components/syh/s-Table/s-Table.vue";
import SDelButton from "@/components/syh/s-Button/s-DelButton.vue";
import SPage from "@/components/syh/s-Page/s-Page.vue";
import { getProjectList } from "@/apis/projectManagement/projectList";
const TableHead = [
  {
    type: "index",
    width: 80,
    align: "center",
    title: "编号",
  },
  {
    title: "用户手机号",
    key: "name",
  },
  {
    title: "申请体现金额",
    key: "age",
  },
  {
    title: "支付方式",
    key: "address",
  },
  {
    title: "体现账号",
    key: "address",
  },
  {
    title: "体现发起时间",
    key: "address",
  },
  {
    title: "处理状态",
    key: "address",
  },
  {
    title: "操作",
    slot: "action",
    width: 150,
    align: "center",
  },
];

export default {
  name: "projectList",
  data() {
    return {
      TableHead: TableHead,
      TableData: [],
      loading: false,
      value: "",
    };
  },
  components: {
    STable,
    SDelButton,
    SPage,
  },
  created() {
    this.getProjectList();
  },
  mounted() {},

  methods: {
    /**
     * @description 获取项目列表
     * @param
     */
    async getProjectList() {
      let { body, code } = await getProjectList();
      if (code == 200) {
        this.TableData = body;
      }
    },
    remove(index) {
    },
    // 分页器
    pageChagne(val) {
      console.log("分页器", val);
    },
    /**
     * @description 跳转详情页
     */
    skitAddProject(key) {
      this.$router.push({ path: "projectDetail", query: { type: key } });
    },
  },
};
</script>

<style lang="scss" scoped>
.platform-num-setting {
  height: 84vh;
  overflow: hidden;
  background: #fff;
  padding: 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
header {
  height: 50px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}
.table-box {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
.new-add-btn {
  width: 80px;
  height: 32px;
  background: #5272e2;
  border-radius: 2px;
  color: #fff;
  border: none;
  cursor: pointer;
}
.footer {
  margin-top: 24px;
}
.module-btn {
  display: flex;
  justify-content: center;
}
</style>